﻿using System.Collections.Generic;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
    public class UnitTrustProportionRepo : BaseRepository<UnitTrustProportion, int>
    {
        public UnitTrustProportionRepo(ISession session)
            : base(session)
        {
        }
        public List<UnitTrustProportion> GetListByHeaderID(int headerId)
        {
            return new List<UnitTrustProportion>(_session.QueryOver<UnitTrustProportion>()
                .Where(x => x.UnitTrustHeaderID == headerId)
                .OrderBy(x => x.CreateDate).Asc.List());
        }
    }
}
